<?php

   require("../../configuracion.php");
   $idSysSection = $sectionCampCorreo;
   $path = "../../";
   require("../../application-top.php");
   // Usamos la BD del Call Center	
   require("../../dbC3.php");
   require("telefono_functions.php");
   $id_Guion = $_GET['idGuion'];
   
   
    $query = "select ";
    $query .= "  id_Guion, id_Segmento, activo,  ";
    $query .= " nombreGuion, descripcionGuion, fechaAlta, ";
    $query .= " DAY(fechaAlta) as diaAlta, MONTH(fechaAlta) as mesAlta, YEAR(fechaAlta) as anoAlta ";
    $query .= " from tbl_Guiones ";
    $query .= " where id_Guion = '" . $id_Guion . "' ;";
	$result = mssql_query ($query);
    $row = mssql_fetch_object($result);


    $FechaAlta = "";
      if ($row->diaAlta <> "")
      {
        if(strlen($row->diaAlta)<2)
        {
          $row->diaAlta = "0".$row->diaAlta;
        }

        if(strlen($row->mesAlta)<2)
        {
          $row->mesAlta = "0".$row->mesAlta;
        }
      
        $FechaAlta = $row->diaAlta . "/" . $row->mesAlta . "/" . $row->anoAlta;
      }

?>
<html>
<head>
  <title><?= $instanciaECRM ?></title>
  <link rel="stylesheet" href="../../styles/style.css" type="text/css">
  <script type="text/javascript" src="../../scripts/dynlayer.js"></script>
</head>
<body leftmargin="0" class="mainBackground" topmargin="0" marginwidth="0" marginheight="0">
<table width="100" border="0" cellpadding="0" cellspacing="0">
  <tr><td><img src="../../images/headerBar.gif" width="590" height="60" alt=""></td></tr>
  <tr>
    <td><table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td bgcolor="#FFFFFF" valign="top" height="400">
<form name="forma">
<table border="0" cellpadding="5" cellspacing="0" width="750">
  <tr><td colspan="2"><table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr><td colspan="2"><img src="images/spacer.gif" height="10" width="1" alt=""></td></tr><tr><td><strong class="pageTitle">Campa&ntilde;as Tel&eacute;fono</strong><br><strong class="pageSubtitle">Detalle Campa&ntilde;a Tel&eacute;fono (Gui&oacute;n)</strong></td><td align="right"><a href="http://www.cacto.com/" target="_blank"><img src="../../images/trademarkCacto.gif" alt="Cacto" border="0"></a><br>
<strong class="systemTitle"><?= $instanciaECRM ?></strong><br>Perfil <strong><?= $PerfilUsuario ?></strong></td></tr>
  </table></td></tr>
  <tr><td>
    <table border="0" cellpadding="5" cellspacing="1" class="mainTableBG">
      <tr class="answerCellBG">
        <td><img src="../../images/icArrowGo.gif" height="13" width="13" alt=""></td>
        <td><a href="telefono_admin.php" target="content">Regresar</a></td>
      </tr>
    </table>
  </td></tr>
  <tr>
  <td valign="top" width="100%">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr><td>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr><td colspan="2">
        <table border="0" cellpadding="5" cellspacing="1" class="secTableBG">

    
          <tr class="mainTableBG"><td class="secTableTitle" colspan="2">Tel&eacute;fono&nbsp;(Gui&oacute;n)&nbsp;<strong><?= $row->nombreGuion ?></strong></td></tr>
          <tr class="answerCellBG"><td width="110" valign="top" class="conceptCellBG">Descripci&oacute;n de la Campa&ntilde;a:</td><td><?= $row->descripcionGuion ?></td></tr>
          <tr class="answerCellBG"><td width="110" class="conceptCellBG">Status:</td><td><? if ($row->activo == 1) { print "Activo"; } else { print "Inactivo";} ?></td></tr>
          <tr class="answerCellBG"><td width="110" class="conceptCellBG">Segmento:</td><td><?= nombre_segmento($row->id_Segmento) ?></td></tr>
          <tr class="answerCellBG"><td width="110" class="conceptCellBG">Fecha&nbsp;de&nbsp;Alta:</td><td><?= $FechaAlta ?></td></tr>
          <tr class="answerCellBG"><td colspan="2">NOTA: Los guiones solo pueden ser administrados a trav&eacute;s del C3.</td></tr>
        </table>
<br>
 <table border="0" cellpadding="5" cellspacing="1" class="secTableBG">
		 
		 
		 <tr class="mainTableBG"><td width="600" class="secTableTitle">Contenido&nbsp;Gui&oacute;n&nbsp;<strong><?= $row->nombreGuion ?></strong></td></tr>
		 <tr class="answerCellBG"><td width="600">
<?

		$st_Query="SELECT   * FROM tbl_GuionesPreguntas WHERE id_Guion = ".$id_Guion." AND (activa = 1) ORDER BY ordenPregunta;";
		$rs_Resultado= mssql_query($st_Query);
		while ($rc_Registro=mssql_fetch_array($rs_Resultado)){
		
				$tipo = "";
				if ($rc_Registro['id_TipoPregunta'] > 1) {
				   $tipo = ": <input name='' type='text' readonly='true' disabled>";
				}
				echo $rc_Registro['contenidoPregunta'].$tipo."<hr>";
	
		}
	

?>
		 
		 
		 </td></tr>
        </table>

        </td></tr>
        <tr><td><img src="../../images/spacer.gif" height="10" width="1" alt=""></td></tr>
        </table>
      </td></tr>
      <tr><td><img src="../../images/spacer.gif" height="10" width="1" alt=""></td></tr>
    </table>
  </td>
  </tr>
</table>
          </td>
        </tr>
      </table></td>
  </tr>
</table>
</form>
<br>
<br>
<br>
<table width="750" border="0" cellpadding="5" cellspacing="0">
  <tr>
    <td align="right"><span class="copyright"><?= $copyright ?></span></td>
  </tr>
</table>
</body></html>
